module.exports = function ($scope, $resource, $modal, toaster) {
	

    $scope.currentPage = 1;      //当前页码
	$scope.itemsPerPage = 10         //每页显示几条

    $scope.search = function(pageNo){
		var para = {
			'pageNo': pageNo,
			'pageSize': $scope.itemsPerPage
		}
		$resource('/api/as/gc/shakeevaluateanswer/getAnswerCountList', {}, {}).save(para, function(res){
			if (res.errcode === 0) {
				$scope.objs = res.data.results;
				$scope.totalItems = res.data.totalRecord;
			} else {
				toaster.error({title: '', body: '无景区服务评价信息'});
			}
		});
	}
	$scope.search(1);
	
	$scope.answerInfo = function(obj){
		var modalInstance = $modal.open({
        	template: require('../views/shakeAnswerInfo.html'),
        	controller: 'shakeAnswerInfo',
        	size: 'lg',
        	resolve: {
				item: function () {
					return obj;
				}
        	}
        });
        modalInstance.result.then(function(result){	
            
        });
	}

	$scope.wxInfo = function(obj){
		var modalInstance = $modal.open({
        	template: require('../views/wxInfo.html'),
        	controller: 'wxInfo',
        	size: 'lg',
        	resolve: {
				item: function () {
					return obj;
				}
        	}
        });
        modalInstance.result.then(function(result){	
            
        });
	}
    

};